package com.huangkailong.designpattern.composite.safe;

/**
 * 文件.
 *
 * @author huangkl
 * @since 1.0.0
 */
public class File implements FileInfo {
    private final String path;

    public File(String path) {
        this.path = path;
    }

    @Override
    public String getPath() {
        return path;
    }

    @Override
    public void showInfo(int level) {
        for (int i = 0; i < level; i++) {
            System.out.print("\t");
        }
        System.out.println(path);
    }
}
